﻿namespace LogisticsTrackingWebApi_V3.Models
{

    /// <summary>
    /// 物流信息
    /// </summary>
    public class LogisticsInfo
    {
        /// <summary>
        /// 运单号
        /// </summary>
        public string TrackingNumber { get; set; } = string.Empty;

        /// <summary>
        /// 物流公司编码
        /// </summary>
        public string CompanyCode { get; set; } = string.Empty;

        /// <summary>
        /// 物流公司名称
        /// </summary>
        public string CompanyName { get; set; } = string.Empty;

        /// <summary>
        /// 物流状态
        /// </summary>
        public string Status { get; set; } = string.Empty;

        /// <summary>
        /// 物流轨迹
        /// </summary>
        public List<LogisticsTrace> Traces { get; set; } = new();

        /// <summary>
        /// 查询时间
        /// </summary>
        public DateTime QueryTime { get; set; } = DateTime.Now;
    }

    /// <summary>
    /// 物流轨迹点
    /// </summary>
    public class LogisticsTrace
    {
        /// <summary>
        /// 时间
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 地点
        /// </summary>
        public string Location { get; set; } = string.Empty;

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; } = string.Empty;
    }

    /// <summary>
    /// 物流公司信息
    /// </summary>
    public class LogisticsCompany
    {
        /// <summary>
        /// 公司编码
        /// </summary>
        public string Code { get; set; } = string.Empty;

        /// <summary>
        /// 公司名称
        /// </summary>
        public string Name { get; set; } = string.Empty;
    }

}
